package com.example.books.Service.Impl;

import com.example.books.Dao.BorrowDao;
import com.example.books.Pojo.BorrowDO;
import com.example.books.Service.BorrowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class BorrowServiceImpl implements BorrowService {

    @Autowired
    private BorrowDao borrowDao;


    @Override
    public List<BorrowDO> getBorrows() {
        return borrowDao.getBorrow();
    }

    @Override
    public boolean setBorrows(Map<String, Object> map) {

        return borrowDao.setBorrow(map);
    }

    @Override
    public boolean updateBorrows(Map<String, Object> map) {
        return borrowDao.updateBorrow(map);
    }

    @Override
    public boolean deleteBorrows(Map<String, Object> map) {
        return borrowDao.deleteBorrow(map);
    }


    @Override
    public List<BorrowDO> getBook(Map<String,Object> map) {
        return borrowDao.getBook(map);
    }

    @Override
    public boolean update(Map<String, Object> map) {
        return borrowDao.update(map);
    }
}
